Optimal. Leaf size=127 \[ \frac {7 a^3 \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {7 i a^3 \sec ^3(c+d x)}{12 d}+\frac {7 a^3 \sec (c+d x) \tan (c+d x)}{8 d}+\frac {i a \sec ^3(c+d x) (a+i a \tan (c+d x))^2}{5 d}+\frac {7 i \sec ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{20 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 127, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3579, 3567,
3853, 3855} \begin {gather*} \frac {7 i a^3 \sec ^3(c+d x)}{12 d}+\frac {7 a^3 \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {7 i \sec ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{20 d}+\frac {7 a^3 \tan (c+d x) \sec (c+d x)}{8 d}+\frac {i a \sec ^3(c+d x) (a+i a \tan (c+d x))^2}{5 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3567
Rule 3579
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \sec ^3(c+d x) (a+i a \tan (c+d x))^3 \, dx &=\frac {i a \sec ^3(c+d x) (a+i a \tan (c+d x))^2}{5 d}+\frac {1}{5} (7 a) \int \sec ^3(c+d x) (a+i a \tan (c+d x))^2 \, dx\\ &=\frac {i a \sec ^3(c+d x) (a+i a \tan (c+d x))^2}{5 d}+\frac {7 i \sec ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{20 d}+\frac {1}{4} \left (7 a^2\right ) \int \sec ^3(c+d x) (a+i a \tan (c+d x)) \, dx\\ &=\frac {7 i a^3 \sec ^3(c+d x)}{12 d}+\frac {i a \sec ^3(c+d x) (a+i a \tan (c+d x))^2}{5 d}+\frac {7 i \sec ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{20 d}+\frac {1}{4} \left (7 a^3\right ) \int \sec ^3(c+d x) \, dx\\ &=\frac {7 i a^3 \sec ^3(c+d x)}{12 d}+\frac {7 a^3 \sec (c+d x) \tan (c+d x)}{8 d}+\frac {i a \sec ^3(c+d x) (a+i a \tan (c+d x))^2}{5 d}+\frac {7 i \sec ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{20 d}+\frac {1}{8} \left (7 a^3\right ) \int \sec (c+d x) \, dx\\ &=\frac {7 a^3 \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {7 i a^3 \sec ^3(c+d x)}{12 d}+\frac {7 a^3 \sec (c+d x) \tan (c+d x)}{8 d}+\frac {i a \sec ^3(c+d x) (a+i a \tan (c+d x))^2}{5 d}+\frac {7 i \sec ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{20 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.64, size = 102, normalized size = 0.80 \begin {gather*} \frac {a^3 (\cos (3 d x)+i \sin (3 d x)) \left (1680 \tanh ^{-1}\left (\sin (c)+\cos (c) \tan \left (\frac {d x}{2}\right )\right )+\sec ^5(c+d x) (448 i+640 i \cos (2 (c+d x))-150 \sin (2 (c+d x))+105 \sin (4 (c+d x)))\right )}{960 d (\cos (d x)+i \sin (d x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.30, size = 200, normalized size = 1.57
method | result | size |
risch | \(-\frac {i a^{3} \left (105 \,{\mathrm e}^{9 i \left (d x +c \right )}-790 \,{\mathrm e}^{7 i \left (d x +c \right )}-896 \,{\mathrm e}^{5 i \left (d x +c \right )}-490 \,{\mathrm e}^{3 i \left (d x +c \right )}-105 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{60 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}+\frac {7 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d}-\frac {7 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}\) | \(122\) |
derivativedivides | \(\frac {-i a^{3} \left (\frac {\sin ^{4}\left (d x +c \right )}{5 \cos \left (d x +c \right )^{5}}+\frac {\sin ^{4}\left (d x +c \right )}{15 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{4}\left (d x +c \right )}{15 \cos \left (d x +c \right )}-\frac {\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{15}\right )-3 a^{3} \left (\frac {\sin ^{3}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}+\frac {\sin ^{3}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{8}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+\frac {i a^{3}}{\cos \left (d x +c \right )^{3}}+a^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(200\) |
default | \(\frac {-i a^{3} \left (\frac {\sin ^{4}\left (d x +c \right )}{5 \cos \left (d x +c \right )^{5}}+\frac {\sin ^{4}\left (d x +c \right )}{15 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{4}\left (d x +c \right )}{15 \cos \left (d x +c \right )}-\frac {\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{15}\right )-3 a^{3} \left (\frac {\sin ^{3}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}+\frac {\sin ^{3}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{8}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+\frac {i a^{3}}{\cos \left (d x +c \right )^{3}}+a^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(200\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 155, normalized size = 1.22 \begin {gather*} -\frac {45 \, a^{3} {\left (\frac {2 \, {\left (\sin \left (d x + c\right )^{3} + \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 60 \, a^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - \frac {240 i \, a^{3}}{\cos \left (d x + c\right )^{3}} - \frac {16 i \, {\left (5 \, \cos \left (d x + c\right )^{2} - 3\right )} a^{3}}{\cos \left (d x + c\right )^{5}}}{240 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 310 vs. \(2 (107) = 214\).
time = 0.36, size = 310, normalized size = 2.44 \begin {gather*} \frac {-210 i \, a^{3} e^{\left (9 i \, d x + 9 i \, c\right )} + 1580 i \, a^{3} e^{\left (7 i \, d x + 7 i \, c\right )} + 1792 i \, a^{3} e^{\left (5 i \, d x + 5 i \, c\right )} + 980 i \, a^{3} e^{\left (3 i \, d x + 3 i \, c\right )} + 210 i \, a^{3} e^{\left (i \, d x + i \, c\right )} + 105 \, {\left (a^{3} e^{\left (10 i \, d x + 10 i \, c\right )} + 5 \, a^{3} e^{\left (8 i \, d x + 8 i \, c\right )} + 10 \, a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} + 10 \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 5 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - 105 \, {\left (a^{3} e^{\left (10 i \, d x + 10 i \, c\right )} + 5 \, a^{3} e^{\left (8 i \, d x + 8 i \, c\right )} + 10 \, a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} + 10 \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 5 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right )}{120 \, {\left (d e^{\left (10 i \, d x + 10 i \, c\right )} + 5 \, d e^{\left (8 i \, d x + 8 i \, c\right )} + 10 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 10 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 5 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - i a^{3} \left (\int i \sec ^{3}{\left (c + d x \right )}\, dx + \int \left (- 3 \tan {\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\right )\, dx + \int \tan ^{3}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int \left (- 3 i \tan ^{2}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\right )\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.84, size = 189, normalized size = 1.49 \begin {gather*} \frac {105 \, a^{3} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right ) - 105 \, a^{3} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right ) + \frac {2 \, {\left (15 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 360 i \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 390 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 960 i \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 400 i \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 390 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 320 i \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 15 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 136 i \, a^{3}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{5}}}{120 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.98, size = 228, normalized size = 1.80 \begin {gather*} \frac {7\,a^3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,d}-\frac {-\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{4}+a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,6{}\mathrm {i}+\frac {13\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{2}-a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,16{}\mathrm {i}+\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,20{}\mathrm {i}}{3}-\frac {13\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{2}-\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,16{}\mathrm {i}}{3}+\frac {a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}+\frac {a^3\,34{}\mathrm {i}}{15}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________